function M = go()
w = 2.5;
thick = 3;
h = 70;
r = 40;

%1 get chord
n = r / w;


%start
n1 = 20 / 2.5;
 rho = 20;

i = 1:n1;
x1 = (i-1) * 2.5;
y1 = sqrt(rho^2 - x1.^2) +20;

i = n1+1: n1 *2
x2 = (i-1) * 2.5;
y2 = sqrt( rho^2 - (x2 - 20).^2   );

chord = [y1,y2];
%end

position = 0.5;
alp = deg2rad(60);

%2 create movie
figure;
hold on;
axis([-50,50, -100,100,0,80]);
axis equal;
n = length(chord);
nFrame = 50;
M = moviein(nFrame);


%1 get the data you need
    [alpha legL xtop ytop ztop xbottom ybottom zbottom ] = actionCal(w,h,alp,chord,position,thick)
    deg = alp;  %save init alp
%draw test;

%3
for i = 1:nFrame


    alp = i * (deg / nFrame);
    h = getHigh(legL(n),alp);
    [alpha ,xtop ,ytop ,ztop, xbottom, ybottom, zbottom ] = actionGen(w,h,alp,chord,legL,position,thick);

    clf
    axis([-50,50, -100,100,0,100]);
    axis equal;
    axis square
    drawTable(xbottom,ybottom,zbottom,xtop,ytop,ztop);
    pause(0.2);
    M(i) = getframe();

end

movie(M,1,12);
